import moment from 'moment';
// const moment = require('moment');

//获取 div
let div = document.querySelector('div');

setInterval(() => {
  //获取当前的时间字符串
  let time = moment().format('YYYY-MM-DD HH:mm:ss');
  div.innerHTML = time;
}, 1000);

